package com.mrlee.controller;

import com.mrlee.service.AdminService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

/**
 * Created by dllo on 18/3/22.
 */
@Controller
public class ModiController {

    @Resource
    private AdminService adminService;

    @RequestMapping(value = "changepsw")
    public String cpsw(){
        return "user/user_modi_pwd";
    }

    @RequestMapping(value = "modipwd")
    public String modi(@Param("name")String name,@Param("password")String password){
        adminService.updateByName(name, password);
        return "user/user_modi_pwd";
    }

}
